<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsecure: xilsecure_versal_net_ecdh_client_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsecure
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xilsecure__versal__net__ecdh__client__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">xilsecure_versal_net_ecdh_client_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This example demonstrates generation of shared secret using Elliptic Curve Diffie–Hellman Key Exchange (ECDH). </p>
<p>To build this application, xilmailbox library must be included in BSP and xilsecure must be in client mode This example is supported for Versal Net devices.</p>
<dl class="section note"><dt>Note</dt><dd><h2>Procedure to link and compile the example for the default ddr less designs </h2>
</dd></dl>
<p>The default linker settings places a software stack, heap and data in DDR memory. For this example to work, any data shared between client running on A72/R5/PL and server running on PMC, should be placed in area which is acccessible to both client and server.</p>
<p>Following is the procedure to compile the example on OCM or any memory region which can be accessed by server </p>
<pre class="fragment">    1. Open example linker script(lscript.ld) in Vitis project and section to memory mapping should
            be updated to point all the required sections to shared memory(OCM or TCM)
            using a memory region drop down selection

                                    OR

    1. In linker script(lscript.ld) user can add new memory section in source tab as shown below
            .sharedmemory : {
                    . = ALIGN(4);
                    __sharedmemory_start = .;
                    *(.sharedmemory)
                    *(.sharedmemory.*)
                    *(.gnu.linkonce.d.*)
                    __sharedmemory_end = .;
                    } &gt; versal_cips_0_pspmc_0_psv_ocm_ram_0_psv_ocm_ram_0

            2. In this example ".data" section elements that are passed by reference to the server-side should
               be stored in the above shared memory section. To make it happen in below example,
       replace ".data" in attribute section with ".sharedmemory". For example,
               static const u8 Hash_P384[] __attribute__ ((section (".data.Hash_P384")))
                                    should be changed to
               static const u8 Hash_P384[] __attribute__ ((section (".sharedmemory.Hash_P384")))
</pre><p>To keep things simple, by default the cache is disabled for this example</p>
<p>The endianness selected in the example should be in sync with the endianness selected for Xilsecure server which is part of PLM.</p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date        Changes
----- ---- ---------- -------------------------------------------------------
1.0   har  06/20/2023 Initial release</pre><pre></pre><dl class="section note"><dt>Note</dt><dd></dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
